import shutil, os, sys
from pathlib import Path
import datetime
import updateModelParamsUtils,  MyUtils


def run():
    
    prefix = "model-"  #model名称的前缀
    stepIdxListNot = []
    publish = None

    if 0:
        rootPath = 'E:\\workspace\\0_model\\东莞-德普特手表模组\\面阵/'
        publish = rootPath
        dstProductsList=[
            #面阵
                 "面阵-型号CV02-1.32"
                ,"面阵-型号CV02-1.469"
                ,"面阵-型号CV02-1.96"
                ,"面阵-型号CV02-2.07"
                ,"面阵-型号CV02-10.27"
                
        ]
        
        #编辑参数####################################################
        srcProduct="面阵-型号CV02-2.07"
        commitInfo = "2.07建模完成，并调整了流程"
        stepIdxListNot = []
        #编辑参数####################################################
    else:
        rootPath = 'E:\\workspace\\0_model\\东莞-德普特手表模组\\线扫/'
        publish = rootPath
        dstProductsList=[
            #线扫
                 "线扫-型号CV02-1.32"
                ,"线扫-型号CV02-1.469"
                ,"线扫-型号CV02-1.96"
                ,"线扫-型号CV02-2.07"
                ,"线扫-型号CV02-10.27"
        ]
        
        #编辑参数####################################################
        srcProduct="线扫-型号CV02-2.07"
        commitInfo = "调整明场粗定位方式为匹配roi"
        stepIdxListNot = []
        #编辑参数####################################################

    updateObj = updateModelParamsUtils.UpdateModel(rootPath=rootPath,dstProductsList=dstProductsList,prefix=prefix,
                                                   publishPath=publish,stepIdxListNot=stepIdxListNot)
    updateObj.update(srcProduct=srcProduct, commitInfo=commitInfo)

    #updateModelParamsUtils.demo(publish=publish,srcProductPath=srcProductPath, 
    #    dstModelPathList=dstModelPathList,commitInfo=commitInfo,stepIdxListNot=stepIdxListNot)
    
if __name__ == "__main__":  
    currentTime = datetime.datetime.now().strftime('%Y-%m-%d  %H:%M:%S')
    currentDate = datetime.datetime.now().strftime('%Y-%m-%d')

    run()

    exit(0)


    
